package constant;

public enum OrderFlowModuleEnum implements  EnumBaseInterface {

    defult(0, "默认"),
    Order(1, "订单主流程"),
    Passanger(2, "游客"),
    Insurance(3, "保险"),
    Confirm(4, "确认单"),
    Contract(5, "合同"),
    Notice(7, "出团书"),
    Invoice(8, "发票"),

    Mail(9, "邮寄"),
    Inquiry(10, "询占单"),
    Refund(11, "退款"),
    Reviews(12, "点评"),
    ChangeOrder(13, "变更订单"),
    WorkOrder(14, "工单"),
    Stock(18, "库存"),
    Pay(19, "支付"),
    MerchantNotification(20, "商户通知"),
    TCYXAfterSalesService(21, "同程严选售后服务"),
    Appointment(22, "预约单"),
    ;

    private int code;
    private String msg;

    OrderFlowModuleEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static String msg(int code) {
        for (OrderFlowModuleEnum m : OrderFlowModuleEnum.values()) {
            if (m.getCode() == code) {
                return m.getMsg();
            }
        }
        return defult.getMsg();
    }


    public int getCode() {
        return code;
    }

    @Override
    public String getName() {
        return this.name();
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
